const CompressionWebpackPlugin = require('compression-webpack-plugin')
module.exports = {
    baseUrl: './',
    assetsDir: 'staticdadsfa',
    productionSourceMap: false,

    configureWebpack: config => {
        let plugins = [
            new CompressionWebpackPlugin({
                filename: '[path].gz[query]',
                algorithm: 'gzip',
                test: new RegExp(
                    '\\.(' +
                    ['js', 'css'].join('|') +
                    ')$',
                ),
                threshold: 10240,
                minRatio: 0.8,
            }),
        ]
        if (process.env.NODE_ENV !== 'development') {
            config.plugins = [...config.plugins, ...plugins]
        }
     
    
        //生产环境配置    
      
    },
    lintOnSave: true,
    runtimeCompiler: true, // 使用构建版vue
    

    // devServer: {
    //     proxy: {
    //         '/api':{
    //             target:'http://jsonplaceholder.typicode.com',
    //             changeOrigin:true,
    //             pathRewrite:{
    //                 '/api':''
    //             }
    //         }
    //     }
    // }
}
